
package com.hlkj.pay.gateway.order;
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import com.hlkj.framework.common.pojo.CommonResult;
import com.hlkj.pay.app.merchant.ext.dto.payment.ChannelPaymentCallBackDto;
import com.hlkj.pay.dto.merchant.MerchantAcctBalanceDto;
import com.hlkj.pay.dto.payment.MerchantPaymentDto;
import com.hlkj.pay.dto.payment.MerchantPaymentQueryDto;
import com.hlkj.pay.dto.payment.MerchantProofDto;
import com.hlkj.pay.infrastructure.model.payment.MerchantPaymentDO;
import com.hlkj.pay.infrastructure.model.payment.MerchantPaymentDetailDO;

/**
 * @author HlpayTeam
 * @date 2024/11/06 13:28
 */
public interface IChannelPaymentGateway {

    /**
     *
     * @param merchantPaymentDto
     * @return
     */
    void submitChannelPayment(MerchantPaymentDto merchantPaymentDto);

    /**
     *
     * @param merchantPaymentDto
     * @return
     */
    List<MerchantAcctBalanceDto> queryChannelPaymentAccount(String mchChannelCode, List<Integer> acctTypeList);

    /**
     * 
     * @param merchantPaymentQueryDto
     * @return
     */
    MerchantPaymentDetailDO queryChannelPaymentDetail(MerchantPaymentQueryDto merchantPaymentQueryDto);

    /**
     * 
     * @param mchChannelCode
     * @param accessCallBody
     * @return
     */
    ChannelPaymentCallBackDto parseCallBackText(String mchChannelCode, HttpServletRequest accessCallBody);

    /**
     *
     * @param channelCode
     * @param accessCallBody
     * @return
     */
    ChannelPaymentCallBackDto parseCallBackTextFix(String channelCode, HttpServletRequest accessCallBody);

    /**
     *
     * @param channelCode
     * @param accessCallBody
     * @return
     */
    boolean verify(String mchChannelCode, String accessCallBody);

    /**
     * 
     * @param mchChannelCode
     * @param callParams
     * @return
     */
    String processCallBack(String mchChannelCode, CommonResult commonResult);

    /**
     * 
     * @param mchChannelCode
     * @param merchantPaymentDetailDO
     * @return
     */
    MerchantProofDto queryDetailProof(String mchChannelCode, MerchantPaymentDetailDO merchantPaymentDetailDO);
    /**
     *
     * @param mchChannelCode
     * @return
     */
    boolean extensionExist(String mchChannelCode);

    /**
     *
     * @param merchantPaymentDO
     * @param merchantPaymentDetailDO
     */
    void notifyChannel(MerchantPaymentDO merchantPaymentDO, MerchantPaymentDetailDO merchantPaymentDetailDO);

    /**
     *
     * @param merchantPaymentDto
     * @param merchantPaymentDetailDO
     */
    String submitChannelRecharge(MerchantPaymentDto merchantPaymentDto, MerchantPaymentDetailDO merchantPaymentDetailDO);

    /**
     *
     * @param merchantPaymentDO
     * @param merchantPaymentDetailDO
     */
    void notifyProofGenerate(MerchantPaymentDO merchantPaymentDO, MerchantPaymentDetailDO merchantPaymentDetailDO);
}
